#####
#set table = $tabdict.table
#set Table = $tabdict.Table
#set pk = $tabdict.pk
#set PTable = $tabdict.PTable
#set propertys = $tabdict.propertys
#set type = $tabdict.type
package com.kylin.${type}.${table.replace("_","")}.orm;

import java.util.Date;
import com.kylin.common.dict.ISelectOption;

#for  $cl in $PTable
#if $cl.seq == ''
import com.kylin.${cl.type}.${cl.name}.orm.${cl.class};
#else
// ${cl.class} $cl.seq
#end if
#end for


#from time import localtime, strftime
#set now = strftime("%Y-%m-%d %H:%M:%S", localtime())
/**
 * $Table generated by ideagen  on $now  
 */

public class ${Table}  implements java.io.Serializable ,ISelectOption {


     private static final long serialVersionUID = 1L;
    // Fields    
     private Long id;
	 #for $field in $propertys
	 private ${field.type.shorttype}  ${field.name};
	 #end for
	 	 
	 #for  $cl in $PTable
     private $cl.class $cl.name$cl.seq;
     #end for

    // Constructors

    /** default constructor */
    public ${Table}() {
    }

    
    /** full constructor */
    public ${Table}(
    	
    	#for $item in $propertys
    	$item.type.shorttype $item.name,
    	#end for
    	#for $parent in $PTable
    	${parent.class} ${parent.name}${parent.seq},  // parent table
   		#end for
       	Long id /* */
    	) {
    		
        this.id = id;
		#for $item in $propertys
        this.${item.name} = ${item.name};
		#end for
		#for $parent in $PTable
        this.${parent.name}${parent.seq} = ${parent.name}${parent.seq};  // parent table
		#end for
    }

   
    // Property accessors

    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
	#for $item in $propertys
	
    public ${item.type.shorttype} get${item.name.capitalize()}() {
        return this.${item.name};
    }
    
    public void set${item.name.capitalize()}(${item.type.shorttype} ${item.name}) {
        this.${item.name} = ${item.name};
    }
	#end for

	#for $item in $PTable
	
	// parent table: ${item.class}
    public ${item.class} get${item.name.capitalize()}${item.seq}() {
		return ${item.name}${item.seq};
	}

	public void set${item.name.capitalize()}${item.seq}(${item.class} ${item.name}${item.seq}) {
		this.${item.name}${item.seq} = ${item.name}${item.seq};
	}
	#end for
		
	public String getValue() {
		return String.valueOf(id);
	}


	public void setValue(String value) {
		
	}
	/*
	public String getName() {
		return String.valueOf(id);
	}


	public void setName(String value) {
		
	}		
	*/
}